package com.xkdx.caipiao;

import android.app.Activity;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class SuggestActivity extends Activity implements OnClickListener {
	private Button commit;
	private EditText ed;
	@Override
	protected void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);
		setContentView(R.layout.suggest_caipiao);
		findView();
		
	}

	private void findView() {
		commit = (Button) findViewById(R.id.btn_suggest);
		ed = (EditText) findViewById(R.id.et_suggest);
		commit.setOnClickListener(this);
	}

	public void onBackClick(View view) {
		finish();
	}

	@Override
	public void onClick(View v) {
		switch(v.getId()){
		case R.id.btn_suggest:
			String str = ed.getText().toString();
			if(TextUtils.isEmpty(str)){
				Toast.makeText(getApplicationContext(), "请输入您的意见或建议",0 ).show();
				
			}else{
				Toast.makeText(getApplicationContext(), "提交成功,谢谢您的关注",0 ).show();
				finish();
			}
			break;
			default:
				break;
		}
	}
}
